package base.office;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;

import org.junit.Test;

/**
 * 
 * <DL>
 * <DT>CSV File Processor Handle</DT>
 * <DD>Static Method Processor<DD>
 * </DL>
 * 
 * @author liuboen
 * 
 * since:2012-6-18
 * version:1.0.0
 */
public class CSVFileHandle {

	@Test
	public void loadCSVFile() {
		try {
			InputStream inputStream = new FileInputStream("D:/每日会员导入/2012.05.09-autoload-utf8.csv");
			InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8");
			BufferedReader bufferedReader = new BufferedReader( inputStreamReader);
			String aString = null;
			while ((aString = bufferedReader.readLine()) != null) {
				System.out.println(aString);
			}

			bufferedReader.close();
			inputStreamReader.close();
			inputStream.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public boolean isValidate(List<CSVDO> list) {
		return false;
	}
}

class CSVDO {
	private String userName;
	private String idCard;
	private String mobileNum;
	private String cardNum;
	private String inputDate;

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public String getMobileNum() {
		return mobileNum;
	}

	public void setMobileNum(String mobileNum) {
		this.mobileNum = mobileNum;
	}

	public String getCardNum() {
		return cardNum;
	}

	public void setCardNum(String cardNum) {
		this.cardNum = cardNum;
	}

	public String getInputDate() {
		return inputDate;
	}

	public void setInputDate(String inputDate) {
		this.inputDate = inputDate;
	}

}